home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / CPlusPlus / TypLsItr.xh < prev    next >
Encoding:
Text File  |  1994-04-19  |  4.0 KB  |  170 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Locrian:WWDCSun:CPlusPlus:TypLsItr.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: somc/smemit.c
  7.  *     SOM Emitter emitxh.dll: somc/smmain.c
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODTypeSetIterator_xh
  18. #define SOM_ODTypeSetIterator_xh
  19.  
  20. class ODTypeSetIterator;
  21.  
  22. #define ODTypeSetIterator_MajorVersion 0
  23. #define ODTypeSetIterator_MinorVersion 0
  24.  
  25. /* C++ som defs */
  26. #include <somcls.xh>
  27.  
  28. /* Include C++ parent defs */
  29. #ifndef SOM_ODObject_xh
  30. #include <ODObject.xh>
  31. #endif
  32.  
  33. #ifndef ODTypeSetIterator_API
  34. #define ODTypeSetIterator_API
  35. /*
  36.  * -- The Class API
  37.  */
  38.  
  39. /*
  40.  * Start of user-defined types:
  41.  */
  42. class ODExtension;
  43. class ODTypeSet;
  44.  
  45. /*
  46.  * End of user-defined types.
  47.  */
  48.  
  49. #if applec ^ PRAGMA_LIB_EXPORT
  50. #pragma lib_export on
  51. #endif
  52.  
  53.  
  54. /* A procedure to create the ODTypeSetIterator Class */
  55. SOMEXTERN SOMClass * SOMLINK ODTypeSetIteratorNewClass(
  56.         integer4 majorVersion,
  57.         integer4 minorVersion);
  58.  
  59. /* The API to the ODTypeSetIterator class object, and the methods it introduces. */
  60. typedef struct ODTypeSetIteratorClassDataStructure {
  61.     SOMClass *classObject;
  62.     somMToken InitODTypeSetIterator;
  63.     somMToken IsNotComplete;
  64.     somMToken First;
  65.     somMToken Next;
  66. } ODTypeSetIteratorClassDataStructure;
  67. #ifdef SOM_NO_DATA_EXPORTS
  68.    SOMEXTERN ODTypeSetIteratorClassDataStructure * ODTypeSetIteratorGetClassData ( void );
  69. #   undef ODTypeSetIteratorClassData
  70. #   define ODTypeSetIteratorClassData (*ODTypeSetIteratorGetClassData())
  71. #else
  72.    SOMEXTERN ODTypeSetIteratorClassDataStructure ODTypeSetIteratorClassData;
  73. #endif /* SOM_NO_DATA_EXPORTS */
  74.  
  75. #if applec ^ PRAGMA_LIB_EXPORT
  76. #pragma lib_export off
  77. #endif
  78.  
  79. #define _ODTypeSetIterator ODTypeSetIteratorClassData.classObject
  80.  
  81. /* The API to parentMtabs for ODTypeSetIterator, and the instance data it introduces. */
  82. SOMEXTERN struct ODTypeSetIteratorCClassDataStructure {
  83.     somMethodTabs parentMtab;
  84.     somDToken instanceDataToken;
  85. } ODTypeSetIteratorCClassData;
  86.  
  87. /*
  88.  * -- Typedefs for Procedures that support Methods introduced by ODTypeSetIterator
  89.  */
  90. SOMEXTERN {
  91. typedef void   (* SOMLINK somTD_ODTypeSetIterator_InitODTypeSetIterator)(ODTypeSetIterator *somSelf, Environment *ev,
  92.         ODTypeSet* typeSet);
  93. typedef ODBoolean   (* SOMLINK somTD_ODTypeSetIterator_IsNotComplete)(ODTypeSetIterator *somSelf, Environment *ev);
  94. typedef ODType   (* SOMLINK somTD_ODTypeSetIterator_First)(ODTypeSetIterator *somSelf, Environment *ev);
  95. typedef ODType   (* SOMLINK somTD_ODTypeSetIterator_Next)(ODTypeSetIterator *somSelf, Environment *ev);
  96. }
  97.  
  98. #endif /* ODTypeSetIterator_API */
  99.  
  100.  
  101. /*
  102.  * -- Method Tokens are Thunks
  103.  */
  104. #undef somresolve_
  105. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  106.  
  107. /*
  108.  * -- The C++ Wrapper Class for ODTypeSetIterator
  109.  */
  110. class ODTypeSetIterator : public ODObject
  111. {
  112. public:
  113.  
  114. void *operator new(size_t size)
  115. {
  116.    SOM_IgnoreWarning(size);
  117.    if (!ODTypeSetIteratorClassData.classObject) 
  118.       ODTypeSetIteratorNewClass(ODTypeSetIterator_MajorVersion,ODTypeSetIterator_MinorVersion);
  119.    return (void *)
  120.       ((somTD_SOMClass_somNew)
  121.       somresolve_((SOMObject *)((void*)(ODTypeSetIteratorClassData.classObject)),
  122.                  SOMClassClassData.somNew))
  123.          ((SOMClass *)((void*)(ODTypeSetIteratorClassData.classObject)));
  124. }
  125.  
  126. void operator delete(void * obj)
  127. {
  128.    ((SOMObject *)obj)->somFree();
  129. }
  130.  
  131. /* public method: InitODTypeSetIterator */
  132. void   InitODTypeSetIterator(Environment *ev,
  133.         ODTypeSet* typeSet)
  134. {
  135.    SOM_Resolve(this,ODTypeSetIterator,InitODTypeSetIterator)
  136.     (this,ev,typeSet);
  137. }
  138.  
  139.  
  140. /* public method: IsNotComplete */
  141. ODBoolean   IsNotComplete(Environment *ev)
  142. {
  143.    return SOM_Resolve(this,ODTypeSetIterator,IsNotComplete)
  144.     (this,ev);
  145. }
  146.  
  147.  
  148. /* public method: First */
  149. ODType   First(Environment *ev)
  150. {
  151.    return SOM_Resolve(this,ODTypeSetIterator,First)
  152.     (this,ev);
  153. }
  154.  
  155.  
  156. /* public method: Next */
  157. ODType   Next(Environment *ev)
  158. {
  159.    return SOM_Resolve(this,ODTypeSetIterator,Next)
  160.     (this,ev);
  161. }
  162.  
  163.  
  164.  
  165. };   /* ODTypeSetIterator */
  166.  
  167.  
  168.  
  169. #endif       /* SOM_ODTypeSetIterator_xh */
  170.